<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<!-- 以数据来操作 -->
<body>
  <div id="app">
    <ul>
      <li v-for="(n,index) in list " :key="n" @click="handle(index)">{{n}}</li>
    </ul>
  </div>

  <script>
    const { createApp } = Vue;

    createApp({
      data() {
        return {
          list: [1, 2, 3, 4]
        }
      },
      methods: {
        handle(n) {
          console.log(n);
          this.list[n]*=10

        }
      }
    }).mount('#app')

  </script>

</body>

</html>